package com.pty.demo.behaviour.memento;

/**
 * @author pengty
 * @date 2020/3/14
 */
public class LifeOriginator {

    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public LifeMemento createLifeMemento() {
        return new LifeMemento(state);
    }

    public void restoreLifeMemento(String state) {
        this.setState(state);
    }

}
